import { ProCard, ProTable } from "@ant-design/pro-components"
import { PageContainer } from "@ant-design/pro-layout"
import ProList from "@ant-design/pro-list"
import { useAxiosGet, useParams } from "@sker/sdk"
import { renderAdminPage, useWebSocket } from "@sker/ui"
import { Button, Popconfirm, Space, Tabs, Tag } from "antd"
import { useEffect, useState } from "react"

export const FilesPage: React.FC<{}> = ({ }) => {
    const { params } = useParams<any>({})
    const { fetch: fetchTaskList } = useAxiosGet('autojs/core/web/user/userList')
    return <PageContainer title={'用户管理'}>
        <div className="h-24px"></div>
        <ProTable rowKey={'id'} search={false} toolBarRender={false} columns={[
            { dataIndex: 'id', title: '编号' },
            { dataIndex: 'title', title: '任务名' },
            { dataIndex: 'name', title: '英文名' },
            {
                title: '操作', render(dom, entity, index, action, schema) {
                    return <>
                        <Button size={'small'} type={'link'} onClick={e => {
                        }}>编辑</Button>
                        <Popconfirm onConfirm={async e => {
                        }} title={'此操作不可逆!您确定要执行此操作吗？'} description={'删除后无法恢复，请慎重操作！！'}>
                            <Button size={'small'} type={'link'} danger >删除</Button>
                        </Popconfirm>
                    </>
                },
            }
        ]} request={() => fetchTaskList(params)}></ProTable>
    </PageContainer>
}
renderAdminPage(FilesPage, 'autojs/core/web/user')
